<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>赠送二维码列表</title>
<#include "/view/admin/headList.html"/>
    <script type="text/javascript">

        $(function() {
            //初始化
        });
    </script>
</head>
<body>



<div class="table-class">
    <div class="panel panel-default" style="margin: 10px 10px 10px;">
     <div class="panel-body">
        <form class="bs-example bs-example-form" role="form">

            <div class="input-group">
                <span class="input-group-addon">活动id</span>
                <select id="actId" name="actId"
                        class="form-control selectpicker"   data-live-search="true"
                >
                    <option value="">请选择活动id</option>
                            <#list listActId as lv>
                                <option value="${lv.value!}"
                                <#if entity.actId??&&entity.actId == lv.value >
                                    selected="selected"
                                </#if>
                                >${lv.name!}</option>
                            </#list>




                </select>

            </div>
                <span class="bank-label">&nbsp;</span>


            <div class="input-group">
                <span class="input-group-addon">库存奖品id</span>
                <select id="awardstockId" name="awardstockId"
                        class="form-control selectpicker"   data-live-search="true"
                >
                    <option value="">请选择库存奖品id</option>
                            <#list listAwardstockId as lv>
                                <option value="${lv.value!}"
                                <#if entity.awardstockId??&&entity.awardstockId == lv.value >
                                    selected="selected"
                                </#if>
                                >${lv.name!}</option>
                            </#list>




                </select>

            </div>
                <span class="bank-label">&nbsp;</span>


                <div class="input-group">
                    <span class="input-group-addon">开始创建时间</span>
                    <input type="text" id="createtimeStart" class="form-control isdatetimepicker" value="<#if (entity.createtimeStart)?? >${entity.createtimeStart?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createtimeStart" name="createtimeStart" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>
                <div class="input-group">
                    <span class="input-group-addon">结束创建时间</span>
                    <input type="text" id="createtimeEnd" class="form-control isdatetimepicker" value="<#if (entity.createtimeEnd)?? >${entity.createtimeEnd?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="createtimeEnd" name="createtimeEnd" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>

                <div class="input-group">
                    <span class="input-group-addon">开始更新时间</span>
                    <input type="text" id="updatetimeStart" class="form-control isdatetimepicker" value="<#if (entity.updatetimeStart)?? >${entity.updatetimeStart?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="updatetimeStart" name="updatetimeStart" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>
                <div class="input-group">
                    <span class="input-group-addon">结束更新时间</span>
                    <input type="text" id="updatetimeEnd" class="form-control isdatetimepicker" value="<#if (entity.updatetimeEnd)?? >${entity.updatetimeEnd?string('yyyy-MM-dd HH:mm:ss')}</#if>" id="updatetimeEnd" name="updatetimeEnd" data-date-format="yyyy-mm-dd hh:ii:ss">
                </div>
                <span class="bank-label">&nbsp;</span>






            <div class="input-group" style="text-align: right;">
                <a class="btn btn-info"  href="javascript:query('${base}/czjgiving/list.do')"><span class="glyphicon glyphicon-search"></span> 查找</a>

            </div>
        </form>
     </div>
    </div>


    <table class="table table-hover table-list table-bordered">
        <thead>
        <tr>
            <td class="table-head-btn">
                <div style="text-align:left;margin-left: 50px;">
                    <a href="${base}/czjgiving/add.do" class="btn btn-primary">新增</a>
                </div>
            </td>
        </tr>
        <tr class="table-head">
            <th>序号</th>
                <th class="label-hidden">主键</th>
                <th>活动id</th>
                <th>库存奖品id</th>
                <th>创建时间</th>
                <th>更新时间</th>
                <th>可赠送数量</th>
                <th>已发数量</th>
                <th>剩余数量</th>
                <th class="label-hidden">删除标识</th>

            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        <#list pagination.list as c>
            <tr>
                <td>${(pagination.pageNo-1)*pagination.pageSize+1+c_index}</td>
                        <td class="label-hidden">${c.givingId!}</td>
                        <td> 
                            <#if c.actId??>
                                    <#list listActId as lv>
                                        <#if lv.value??&&c.actId == lv.value >
                                        ${lv.name!}
                                        </#if>
                                    </#list>

                            </#if>

                        </td>
                        <td> 

                            <#if c.awardstockId??>
                                    <#list listAwardstockId as lv>
                                        <#if lv.value??&&c.awardstockId == lv.value >
                                        ${lv.name!}
                                        </#if>
                                    </#list>

                            </#if>
                        </td>
                        <td><#if c.createtime?? >${c.createtime?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
                        <td><#if c.updatetime?? >${c.updatetime?string('yyyy-MM-dd HH:mm:ss')}</#if></td>
                            <td>${c.amount!}</td>

                            <td>${c.sendNum!}</td>

                            <td>${c.remain!}</td>

                        <td class="label-hidden">${c.delFlag!}</td>

                <td>
                    <a href="${base}/czjgiving/detail.do?givingId=${c.givingId!}" class="btn btn-primary">详情</a>
                    <a href="${base}/czjgiving/add.do?givingId=${c.givingId!}" class="btn btn-primary">修改</a>
                    <a href="javascript:checkDelete('${base}/czjgiving/delete.do?givingId=${c.givingId!}')" class="btn btn-primary">删除</a>
                </td>
            </tr>








        </#list>
        </tbody>
    </table>


</div>
<script>

    function queryCondition(){
        var href="";
            href+='actId='+$('#actId').val();
                href+='&'
            href+='awardstockId='+$('#awardstockId').val();
                href+='&'
            href+='createtimeStart='+$('#createtimeStart').val()+"&";
            href+='createtimeEnd='+$('#createtimeEnd').val();
                href+='&'
            href+='updatetimeStart='+$('#updatetimeStart').val()+"&";
            href+='updatetimeEnd='+$('#updatetimeEnd').val();
                href+='&'
        return href;
    }

</script>

</body>
</html>
